package Arithmetic;

/**
 * Created by Administrator on 2017/6/2.
 */
import java.util.ArrayList;

/**
 * 后缀表达式
 */
public class Compute {

    public static void main(String[] args) {
        Operators op = new Operators();
        String expression = "9 + ( 3 - 1 ) * 3 + 10 / 2";
        ArrayList<String> res = op.getHouZuiBDS(expression);
        System.out.print("后缀表达式：");
        for (String string : res) {
            System.out.print(string+" ");
        }
        int result = op.getResult(res);
        System.out.println();
        System.out.println("计算结果："+result);
    }
}